Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Create trait for NPoS election algorithms #9664

Merged
37 commits merged into from
Sep 9, 2021
Merged

Create trait for NPoS election algorithms #9664

37 commits merged into from
Sep 9, 2021

Conversation

emostov
Copy link
Contributor

@emostov emostov commented Aug 31, 2021

This PR creates a common trait that all NPoS election algorithms can implement. This is particularly helpful when it is desired for the election solving approach to be configurable (e.g an election result mining binary).

polkadot companion: paritytech/polkadot#3752

closes: #9666

@emostov emostov added A3-in_progress Pull request is in progress. No review needed at this stage. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Aug 31, 2021
@emostov emostov added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels Aug 31, 2021
Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to fix a few things, but overall correct to me.

Important property to maintain is that this PR should not have ANY logical changes, only abstraction changes.

@emostov emostov removed the request for review from gui1117 September 8, 2021 23:02
@emostov
Copy link
Contributor Author

emostov commented Sep 8, 2021

bot merge

@ghost
Copy link

ghost commented Sep 8, 2021

Error: When trying to meet the "Project Owners" approval requirements: this pull request does not belong to a project defined in Process.json.

Approval by "Project Owners" is only attempted if other means defined in the criteria for merge are not satisfied first.

The following errors might have affected the outcome of this attempt:

  • 'Benchmarking and Weights' does not match any projects in substrate's Process.json

@emostov
Copy link
Contributor Author

emostov commented Sep 9, 2021

bot merge

@ghost
Copy link

ghost commented Sep 9, 2021

Error: Approval criteria was not satisfied.

The following errors might have affected the outcome of this attempt:

  • 'Benchmarking and Weights' does not match any projects in substrate's Process.json

Merge failed. Check out the criteria for merge.

@bkchr
Copy link
Member

bkchr commented Sep 9, 2021

bot merge

@ghost
Copy link

ghost commented Sep 9, 2021

Trying merge.

@ghost ghost merged commit f84ac63 into master Sep 9, 2021
@ghost ghost deleted the kiz-election-trait branch September 9, 2021 19:46
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Use sp_npos_elections::Error for sp_npos_elections::phragmms
4 participants